Set

Function

This API is used to import Channel > IPChannel page parameters.

Request Message

Parameter Description

Table 1

ParameterRangeTypeDescription
channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”
The number of channels depends on the capability of the equipment
string arrayEach array bit represents a channel with a string
base_secondary_authenticationobjectEncrypted information for authentication. See base_secondary_authentication information table for structure members details.
chnstringImport channel information and add it to the channel
usernamestringUsername used for IPC login
ip/urlmain;urlsubstringIPC IP address
camera modestringConnection mode 0-Auto 1-Normal 2-Fisheye 3-Binocular
max channelstringMaximum number of channels for front-end devices
connect modestringConnection agreement
base_enc_passwordJson ObjectEncrypted Password,see base_enc_password for more information.

Sample:

POST /API/ChannelConfig/IpcInfoList/Set HTTP/1.1
{
    "version": "1.0",
    "data": {
        "base_secondary_authentication": {
            "seq": 4,
            "cipher": "QKjxiEirYYvWpVH95ajXREGTIvFB1ICNLQ7xlxg82t0="
        },
        "channel_info": [
            {
                "chn": "5",
                "username": "admin",
                "port": "80",
                "ip/urlmain;urlsub": "172.16.11.138",
                "protocol(private:1;onvif:2;rtsp:3)": "1",
                "connect mode": "0",
                "max channel": "1",
                "camera mode": "Auto",
                "base_enc_password": {
                    "seq": 0,
                    "peer_key": "0N9T+VoMORBB8/l1Jbu4cTv0uXdGI/H/6MZbIvsPuNmQ=",
                    "cipher": "0U2JuJiB7tgKN1bocrnQlypHouBHW5hKzV240q4SmnuDiY2ah"
                }
            }
        ]
    }
}

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {}
}

Error Code

See Response Messages Body and Common error_code for more information.